<!--订单管理-订单详情-->
<template>
  <div class="video-list-manage-parent" ref="parentContainer">
    <!--操作表单区域-->
    <div class="option-parent" ref="optionParentContainer">
    </div>

    <!--数据表格区域-->
    <div v-bind:style="{height:tableHeight+'px',width:'100%',overflow:'auto'}" v-loading="loading">
      <el-form ref="form" label-width="auto" style="padding: 10px" label-position="center">
        <p class="item-title">基本信息:</p>
        <el-row :gutter="0">
          <el-col :span="5">
            <el-form-item label="订单编号:">
              {{orderDetail.ordersn}}
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="商户ID:">
              {{orderDetail.sellerid}}
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="在商户下单次数:">
              {{orderDetail.order_count}}
            </el-form-item>
          </el-col>
          <el-col :span="5">
            <el-form-item label="代理名称:">
              {{orderDetail.agentname}}
            </el-form-item>
          </el-col>
          <el-col :span="4">
            <el-form-item label="用户ID:">
              {{orderDetail.userid}}
            </el-form-item>
          </el-col>
        </el-row>
        <p class="item-title">
          <span>订单状态:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row :gutter="0">
          <el-col :span="6">
            <el-form-item label="订单主状态:">
              {{orderDetail.orderstate1}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
          <el-col :span="6">
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>
        <p class="item-title">
          <span>订单退款状态:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row :gutter="0">
          <el-col :span="6">
            <el-form-item label="退款状态:">
              {{orderDetail.orderstate2}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="退款原因:">
              {{orderDetail.refundreason}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="退款描述:">
              {{orderDetail.refunddesc}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="0">
          <el-col :span="6">
            <el-form-item label="退款进度:">
              {{orderDetail.refundcode}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="错误描述:">
              {{orderDetail.refunderror}}
            </el-form-item>
          </el-col>
        </el-row>
        <p class="item-title">
          <span>订单条目:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row :gutter="0">
          <el-col :span="12">
            <el-form-item label="订单描述:">
              {{orderDetail.orderdescription}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <!--<el-form-item label="订单描述OK:">-->
              <!--{{orderDetail.orderdescription}}-->
            <!--</el-form-item>-->
          </el-col>
        </el-row>
        <p class="item-title">
          <span>商户信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row :gutter="0" style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="名称:">
              {{orderDetail.sellername}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="头像:">
              {{orderDetail.sellername}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="手机号:">
              {{orderDetail.sellerphone}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="地址:">
              {{orderDetail.selleraddress}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="0" style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="经度:">
              {{orderDetail.seller_latitude}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="纬度:">
              {{orderDetail.seller_longitude}}
            </el-form-item>
          </el-col>
        </el-row>
        <p class="item-title" style="margin-top: 20px">
          <span>订单相关时间:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="订单生成时间:">
              {{orderDetail.dt0}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="订单更新时间:">
              {{orderDetail.dt_update}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="付款时间:">
              {{orderDetail.dt10}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="商户接单时间:">
              {{orderDetail.dt20}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="预计送达时间:">
              {{orderDetail.dt21}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手分配时间:">
              {{orderDetail.dt30}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手接单时间:">
              {{orderDetail.dt31}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手到店时间:">
              {{orderDetail.dt40}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="骑手取货时间:">
              {{orderDetail.dt50}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="完成配送时间:">
              {{orderDetail.dt60}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="评价时间:">
              {{orderDetail.dt70}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="用户发起退款时间:">
              {{orderDetail.dtb10}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="商家退款决策时间:">
              {{orderDetail.dtb20}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="商家退款决策时间:">
              {{orderDetail.dtb20}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="用户发起申诉时间:">
              {{orderDetail.dtb30}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="仲裁时间:">
              {{orderDetail.dtb40}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="10">
            <el-form-item label="商家未接单自动退款时间:">
              {{orderDetail.dtb50}}
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="配送距离(米):">
              {{orderDetail.deliver_distance}}
            </el-form-item>
          </el-col>
          <el-col :span="7">
            <el-form-item label="配送时间(分钟):">
              {{orderDetail.deliver_time_minute}}
            </el-form-item>
          </el-col>
        </el-row>
        <p class="item-title" style="margin-top: 20px">
          <span>配送信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="骑手ID:">
              {{orderDetail.riderid}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手姓名:">
              {{orderDetail.ridername}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手手机号:">
              {{orderDetail.ridermobile}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="骑手头像:">
              {{orderDetail.riderimage}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="骑手评分:">
              {{orderDetail.rider_evaluate_average_score}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="班次:">
              {{orderDetail.deliver_day_night}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>
        <p class="item-title" style="margin-top: 20px">
          <span>付款信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="billid1:">
              {{orderDetail.billid1}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="billid2:">
              {{orderDetail.billid2}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="订单金额:">
              {{orderDetail.total_amount}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="支付系统费率:">
              {{orderDetail.total_percent}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="商品总额:">
              {{orderDetail.total_product}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="配送费:">
              {{orderDetail.total_deliver}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="餐盒费:">
              {{orderDetail.total_package}}
            </el-form-item>
          </el-col>
        </el-row>
        <p class="item-title" style="margin-top: 20px">
          <span>订单金额信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="配送费使用的满减金额:">
              {{orderDetail.total_promotion_deliver}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="是否使用商户首单减免:">
              {{orderDetail.total_promotion_seller_newclient}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="商户满减金额:">
              {{orderDetail.total_promotion_seller}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="红包ID:">
              {{orderDetail.bonusid}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="webbonusid:">
              {{orderDetail.webbonusid}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="使用的红包金额:">
              {{orderDetail.total_bonus}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="使用的红包金额（系统）:">
              {{orderDetail.total_bonus_system}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="使用的红包金额（代理）:">
              {{orderDetail.total_bonus_agent}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="使用的红包金额（商户）:">
              {{orderDetail.total_bonus_seller}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="实付金额:">
              {{orderDetail.total_pay}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="代理对商户抽成百分比:">
              {{orderDetail.agent_charge_percent}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="平台对代理抽成百分比:">
              {{orderDetail.sys_charge_percent}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>

        <p class="item-title" style="margin-top: 20px">
          <span>商户金额信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="平台服务费（给代理):">
              {{orderDetail.total_service_seller}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="商户收入:">
              {{orderDetail.total_income_seller}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="代理收入:">
              {{orderDetail.total_income_agent}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="系统(*支付系统费率):">
              {{orderDetail.total_bonus_system}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="平台收入:">
              {{orderDetail.total_income_system}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="支付类型:">
              {{orderDetail.pay_type}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
          </el-col>
          <el-col :span="6">
          </el-col>
        </el-row>
        <p class="item-title" style="margin-top: 20px">
          <span>买家信息:&nbsp;&nbsp;&nbsp;</span>
        </p>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="买家姓名:">
              {{orderDetail.buyername}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="性别:">
              {{orderDetail.buyersex}}
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="地址:">
              {{orderDetail.buyeraddr1}}{{orderDetail.buyeraddr2}}{{orderDetail.buyeraddr3}}
            </el-form-item>
          </el-col>
        </el-row>
        <el-row style="font-size: 14px;color: #606266;">
          <el-col :span="6">
            <el-form-item label="手机号:">
              {{orderDetail.buyermobile}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="经度:">
              {{orderDetail.buyer_longitude}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="纬度:">
              {{orderDetail.buyer_latitude}}
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item label="备注:">
              {{orderDetail.buyermemo}}
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>

    <!--翻页区域-->
    <div class="pagination-parent" ref="paginationParentContainer">

    </div>
  </div>
</template>

<script>
  import CPageBase from "../fragment/CPageBase"
  import CRootBase from "../fragment/CRootBase"

  export default {
    data() {
      return {
        pathArr: [
          {path: "/", name: "首页"},
          {path: "/container/order_list_wait", name: "待处理订单"},
          {path: "/container/order_detail_2", name: "订单详情"},
        ],
        orderid: "",
        orderDetail: "",
        loading: false,
      }
    },
    mixins: [CPageBase, CRootBase],
    components: {},
    watch: {},
    mounted() {
    },
    activated() {
      this.initCurrentPath();
      this.initOrderDetail();
    },
    deactivated() {
      this.$destroy(true);
    },
    methods: {
      //初始化面包屑路径
      initCurrentPath() {
        this.$store.commit('changeCurrentLocation', this.pathArr);
      },

      //初始化订单信息
      initOrderDetail() {
        this.orderid = this.$route.query.orderid;
        this.requestOrderDetail();
      },

      //查询订单详情
      requestOrderDetail() {
        let parameter = new URLSearchParams();
        parameter.append("action", "agent_order_view");
        parameter.append("orderid", this.orderid);
        let that = this;
        that.loading = true;
        this.$http.requestAuthData(that, parameter, function (data) {
          that.orderDetail = data;
        });
      }
    }
  }
</script>

<style lang="scss" scoped="" type="text/scss" src="../../assets/style/base-info.scss">
</style>

